﻿<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="Include.asp"-->
<%

dim table,sztable
table = table & "|" & "about"
table = table & "|" & "AD1"
table = table & "|" & "AD2"
table = table & "|" & "Annex"
table = table & "|" & "Celeb"
table = table & "|" & "Enterprise"
table = table & "|" & "FriendLinks"
table = table & "|" & "Job"
table = table & "|" & "news"
table = table & "|" & "config"

sztable = split(table,"|")

for i = 1 to UBound(sztable)
'for i = 6 to 6
	sql=" Select * from "& sztable(i) &""
	Set rs = Server.CreateObject ("ADODB.Recordset")
	rs.open sql,conn,1,3
	do while not rs.eof
		for j = 1 to rs.Fields.Count-1
			'response.write rs(j) & "<br>"
			rs(j) = nojs(rs(j))
			rs.update
		next
'		response.write server.HTMLEncode( nojs(rs(4)) ) & "<br>"
'		response.write server.HTMLEncode( nojs(rs(5)) ) & "<br>"
		rs.movenext
	loop
	rs.close
	set rs = nothing
next

function nojs(data)
	if data <>"" then
		Dim objRegExp
		Set objRegExp = New RegExp   
		'设置是否区分字符大小写，true表示忽略大小写
		objRegExp.IgnoreCase=True   
		'设置是否全局匹配，True表示全局匹配   
		objRegExp.Global=True   
		objRegExp.Pattern="\<script.+?\<\/script\>"   
		nojs=objRegExp.Replace(data,"") 
		set objRegExp=nothing
	end if
end function

%>